export default {
  searchName(state,val){
    state.searchName = val
  },
  updateUsers(state,users){
    state.users=users
  },

  //重置
  reset(state){
    state.showText = true;
    state.showLoading = true;
    state.showNoBody = true;
  },

  //请求前
  beforeReq(state){
    state.showText = false;
    state.showLoading = true;
    state.showNoBody = true;
  },
  //请求后 有数据 要清空输入框
  afterReqHasBody(state){
    state.showText = false;
    state.showLoading = false;
    state.showNoBody = false;
    state.searchName=""
  },

  //请求后 无数据 要清空输入框
  afterReqNoBody(state){
    state.showText = false;
    state.showLoading = false;
    state.showNoBody = true;
    state.searchName=""
  },

  //请求失败
  reqFail(state){
    state.showText = false;
    state.showLoading = false;
    state.showNoBody = true;
  }
}
